package main

import "fmt"

func main() {
	// 字符串数据类型
	var s1 string = "你好全面拥抱Golang"
	fmt.Println(s1)
	var s2 string = "abc"
	s2 = "def"
	fmt.Println(s2)
	var s3 string = "abcdef\\ghijklm"
	fmt.Println(s3)
	var s4 string = "abcdef" + "ghijklm"
	fmt.Println(s4)
	var s5 string = `if else elseif`
	fmt.Println(s5)

	// 基本数据类型默认值
	var a int
	var b float32
	var c float64
	var d bool
	var e string
	fmt.Println(a)
	fmt.Println(b)
	fmt.Println(c)
	fmt.Println(d)
	fmt.Println(e)

	// 数据类型显式转换
	var n1 int = 100
	var n2 float32 = float32(n1)// n1的类型不变
	fmt.Println(n1)
	fmt.Println(n2)
	fmt.Printf("%T",n1)
	fmt.Println()
	fmt.Printf("%T",n2)
	fmt.Println()
	var n3 int64 = 888888
	var n4 int8 = int8(n3)
	fmt.Println(n4)
	var venkiChen string = "venki.chen"
	fmt.Println(venkiChen)
}